package cn.book.bus.enums;

/**
 * @author ssm
 * @version v1.0
 * @ClassName WebEnum
 * @Date: 2025/3/22 12:00
 * @Description: 描述
 */
public enum WebEnum {
    /**
     * 网站枚举
     */
    JINYON("https://www.qiushibaike.com/", "金庸");

    private String url;
    private String name;

    WebEnum(String url, String name) {
        this.url = url;
        this.name = name;
    }

    public String getUrl() {
        return url;
    }

    public String getName() {
        return name;
    }

    public static WebEnum getEnum(String name) {
        for (WebEnum webEnum : WebEnum.values()) {
            if (webEnum.getName().equals(name)) {
                return webEnum;
            }
        }
        return null;
    }
}
